package cn.tedu.boot041.mapper;

import cn.tedu.boot041.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMappper {

    @Select("select password from user where username = #{username}")
    User selectOne(String username);

    @Insert("insert into user(username,password,nickname) values (#{username},#{password},#{nickname})")
    void insert(User user);

}
